import axios from '@/utils/requst'
export const reqGetArticleCate = () =>
  axios({
    method: 'get',
    url: '/my/cate/list'
  })
// 添加文章接口
export const reqAddArticleCate = (data) =>
  axios({
    method: 'POST',
    url: '/my/cate/add',
    data
  })
// 删除文章接口
export const reqDelArticle = (id) =>
  axios({
    method: 'DELETE',
    url: '/my/cate/del',
    params: { id: id }
  })
// 修改接口
export const reqGetCateInfoById = (id) => {
  return axios({
    method: 'get',
    url: '/my/cate/info',
    params: { id: id }
  })
}
export const reqUpdataArticle = (data) =>
  axios({
    method: 'PUT',
    url: '/my/cate/info',
    data
  })
// 获取文章分类
export const reqGetArtlist = (obj) =>
  axios({
    method: 'get',
    url: '/my/article/list',
    params: obj
  })
// 获取文章详情信息
export const reqGetArtInfo = (id) => {
  return axios({
    method: 'get',
    url: '/my/article/info',
    params: {
      id
    }
  })
}
// 根据ID删除文章分类
export const reqDelArticleById = (id) =>
  axios({
    method: 'delete',
    url: '/my/article/info',
    params: {
      id
    }
  })
